#pragma once

#include <atomic>

class DevUpgradeGuard {
private:
    std::atomic<bool> &_isUpgrade;

public:
    DevUpgradeGuard(std::atomic<bool> &isUpgrade);
    ~DevUpgradeGuard();
};

DevUpgradeGuard::DevUpgradeGuard(std::atomic<bool> &isUpgrade)
    : _isUpgrade(isUpgrade)
{
    _isUpgrade = true;
}

DevUpgradeGuard::~DevUpgradeGuard()
{
    _isUpgrade = false;
}